/*
 * PaymentBO.java
 *
 * Created on March 5, 2007, 4:17 PM
 * 
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package edu.byu.isys413.jjenkins.data;

 /**
 * The class is represents the payment business object. It is created
 * by the paymentDAO. It extends businessObject which contains the ID,
 * alreadyInDatabase and dirty. This class contains the attributes of the payment
 * with all getters and setters and any functionality of the object. 
 * 
 * @author      Jeff Jenkins
 * @version     1.0
 * 
 */
public class PaymentBO extends BusinessObject {
    
    private double amount = 0;
    private String type = null;  // Debit, Credit, Cash
    private TransactionBO transaction = null; 
    
    
    
    /** Creates a new instance of PaymentBO */
    public PaymentBO() {
    }

    /**
     * Returns the amount variable
     * @return 
     */
    public double getAmount() {
        return amount;
    }

    /**
     * Sets the amount variable
     * @param amount 
     */
    public void setAmount(double amount) {
        this.amount = amount;
        setDirty(true);
    }
    
    
    /**Returns the type variable
     * @return String type*/
    public String getType() {
        return type;
    }
    
    /**
     * Sets the type variable
     * 
     * @param type 
     */
    public void setType(String type) {
        this.type = type;
        setDirty(true);
    }

   
    /**
     * Returns the transaction variable
     * @return transaction
     */
    public TransactionBO getTransaction() {
        return transaction;
    }

    /**Gets the transaction variable
     * @param TransactionBO transaction*/
    public void setTransaction(TransactionBO transaction) {
        this.transaction = transaction;
        setDirty(true);
    }
    

    
}
